import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import { Picker, List, InputItem, NavBar,  WingBlank, WhiteSpace, Icon, Button } from 'antd-mobile';

export default class UserCenter extends Component {
	constructor(props){
		super(props);
	}

	render() {
		let { logout, info } = this.props;
		return (
				<div>
					<NavBar mode="light" iconName=""
					className='my_navbar_title'
					>会员中心</NavBar>
					<div className='my_container_blank'></div>
				    <WhiteSpace size="sm" />
				    
					<List>
						<List.Item 
						extra={typeof(info.username) == 'undefined' ? '...' : info.username}
						>
						用户名</List.Item>
						<List.Item 
						extra={typeof(info.school_name) == 'undefined' ? '...' : info.school_name}
						>
						所属学校</List.Item>

				        <WhiteSpace size="md" />
				        <WingBlank size="md">
					  		<Button type="primary" onClick={(e) => {logout();}}>退出登录</Button>
						</WingBlank>
						<WhiteSpace size="md" />
				    </List> 
				</div>
			);
	}
}